package com.shuda.business.monitor.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import java.time.LocalDateTime;

/**
 * 监控告警配置实体类：移除Lombok，提供显式访问器，保证MyBatis条件构造器方法引用。
 */
@TableName("monitor_alert_config")
@Schema(name = "MonitorAlertConfigEntity", description = "监控告警配置实体")
public class MonitorAlertConfigEntity {

    @TableId(type = IdType.AUTO)
    @Schema(description = "配置ID")
    private Long id;

    @Schema(description = "告警名称")
    private String alertName;

    @Schema(description = "告警类型(success_rate-成功率,processing_time-处理时间,exception_count-异常数量,data_volume-数据量)")
    private String alertType;

    @Schema(description = "告警阈值")
    private String threshold;

    @Schema(description = "告警级别(info-信息,warning-警告,critical-严重)")
    private String alertLevel;

    @Schema(description = "告警方式(email-邮件,sms-短信,webhook-接口)")
    private String alertMethod;

    @Schema(description = "告警接收人")
    private String alertRecipients;

    @Schema(description = "是否启用(0-禁用,1-启用)")
    private Integer enabled;

    @Schema(description = "描述")
    private String description;

    @Schema(description = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "更新人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Schema(description = "逻辑删除标识(0-未删除,1-已删除)")
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    /**
     *
     * MonitorAlertConfigEntity 访问器
     * @param $params$
     * @return $returns$
     * @author ink
     * @Description: 显式getter/setter，避免Lombok缺失导致方法未生成
     * @date 2025-11-09 10:46
     */
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public String getAlertName() { return alertName; }
    public void setAlertName(String alertName) { this.alertName = alertName; }

    public String getAlertType() { return alertType; }
    public void setAlertType(String alertType) { this.alertType = alertType; }

    public String getThreshold() { return threshold; }
    public void setThreshold(String threshold) { this.threshold = threshold; }

    public String getAlertLevel() { return alertLevel; }
    public void setAlertLevel(String alertLevel) { this.alertLevel = alertLevel; }

    public String getAlertMethod() { return alertMethod; }
    public void setAlertMethod(String alertMethod) { this.alertMethod = alertMethod; }

    public String getAlertRecipients() { return alertRecipients; }
    public void setAlertRecipients(String alertRecipients) { this.alertRecipients = alertRecipients; }

    public Integer getEnabled() { return enabled; }
    public void setEnabled(Integer enabled) { this.enabled = enabled; }

    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }

    public String getCreateBy() { return createBy; }
    public void setCreateBy(String createBy) { this.createBy = createBy; }

    public LocalDateTime getCreateTime() { return createTime; }
    public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; }

    public String getUpdateBy() { return updateBy; }
    public void setUpdateBy(String updateBy) { this.updateBy = updateBy; }

    public LocalDateTime getUpdateTime() { return updateTime; }
    public void setUpdateTime(LocalDateTime updateTime) { this.updateTime = updateTime; }

    public Integer getDeleted() { return deleted; }
    public void setDeleted(Integer deleted) { this.deleted = deleted; }
}